#include<stdio.h>
#include<string.h>

int main()
{
	int sign,sum=0,key=1,sum1=0;
	char c[20]={'\0'},iden;
	gets(c);
	for(sign=0;sign<strlen(c)-2;sign++)
	{
		if(c[sign]>='0'&&c[sign]<='9')
		{
			sum+=(c[sign]-'0')*(key++);
		}
		if(sign==10) sum1=sum;
	}
	iden=sum%11;
	if(iden==10&&c[12]=='X')  printf("Right");
	else if(iden==(c[12]-'0')) printf("Right");
	else
	{
		if(iden==10) c[12]='X';
		else c[12]='0'+iden;
		puts(c);
	}
	return 0;
}
